from selenium import webdriver
from postion import options
from postion import service
from login_para import Login

url = r'http://192.168.92.131/upload/'
username = 'admin'
password = '123456'
driver = webdriver.Chrome(options=options, service=service)
driver.get(url)
# driver.maximize_window()

login = Login(driver)
login.login(username, password)
login.logout()
# # 登录
# driver.find_element(By.ID,'ls_username').clear()
# driver.find_element(By.ID,'ls_username').send_keys('admin')
# driver.find_element(By.ID,'ls_password').clear()
# driver.find_element(By.ID,'ls_password').send_keys('123456')
# sleep(3)
# driver.find_element(By.CLASS_NAME,'pn.vm').click()
# sleep(3)
#
# #退出
# driver.find_element(By.LINK_TEXT,'退出').click()
# sleep(3)
#
driver.quit()
